package com.le.tester.book.effectivejava3rdchinese.secondReading.l16;

/**
 * createTime：2024-08-23 10:48
 * description：在公共类中使用访问方法而不是公共属性,公共类的可变属性不要暴露
 */
public class PointSurround {
    class Point {
        public double x;
        public double y;

        public Point(double x, double y) {
            this.x = x;
            this.y = y;
        }

        public double getX() {
            return x;
        }

        public void setX(double x) {
            this.x = x;
        }

        public double getY() {
            return y;
        }

        public void setY(double y) {
            this.y = y;
        }
    }


}
